import 'package:enterprise_v6_app/app/core/http/http.dart';
import 'package:enterprise_v6_app/app/core/utils/interface.dart';
import 'package:enterprise_v6_app/app/data/entities/double_control/base_unit_stop_list_entity.dart';
import 'package:get/get.dart';

/// 装置开停车大检修台账详情
class BaseUnitStopDetailController extends GetxController {
  BaseUnitStopListEntity? data = BaseUnitStopListEntity();

  @override
  void onInit() {
    super.onInit();
    baseUnitStopGet();
  }

  void baseUnitStopGet() async {
    final res = await HttpUtil().generateGetRequest<BaseUnitStopListEntity>(
      Interface.baseUnitStopGet,
      queryParameters: {'id': Get.arguments['id']},
    ).execute();
    res.onSuccess((result) {
      if (result.data != null) {
        data = result.data;
      }
    });
    update();
  }
}
